decimal to binary in python without inbuilt function